package com.zzcoder.mall.data.dao.repository;

import com.zzcoder.mall.data.model.OmsCartItem;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Optional;

public interface OmsCartItemRepository extends BaseEntityRepository<OmsCartItem> {
    Page<OmsCartItem> findAllByMemberIdEquals(Long memberId, Pageable pageable);

    Optional<OmsCartItem> findByMemberIdAndProductId(Long memberId, Long productId);

    Optional<OmsCartItem> findByIdAndMemberId(Long id, Long memberId);

    List<OmsCartItem> findAllByIdInAndMemberIdEquals(List<Long> ids, Long memberId);
}
